package com.webshop.domain;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Items {
    public static List<String> allclass = new ArrayList<String>(Arrays.asList("电子商品", "蔬菜", "教育书刊", "娱乐游戏"));

    public int getSize() {
        return allclass.size();
    }

    public static int size = allclass.size();
    String pname;
    int pprice;
    String pinfo;
    String sinfo;
    String whos;

    public String getWhos() {
        return whos;
    }

    public void setWhos(String whos) {
        this.whos = whos;
    }

    public String getSinfo() {
        return sinfo;
    }

    public void setSinfo(String sinfo) {
        this.sinfo = sinfo;
    }

    String pimgsrc;
    String pclass;
    String attr;
    String attrv;
    int id;

    public void setAttr(String attr) {
        this.attr = attr;
    }

    public void setAttrv(String attrv) {
        this.attrv = attrv;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getAttrv() {
        return attrv;
    }

    public String getAttr() {
        return attr;
    }

    public Items() {
    }

    public Items(String pname, int pprice, String pinfo, String pimgsrc, String pclass, String id, String sinfo, String whos) {
        this.pname = pname;
        this.pprice = pprice;
        this.pclass = pclass;
        this.pimgsrc = pimgsrc;
        this.pinfo = pinfo;
        this.id = Integer.parseInt(id);
        this.sinfo = sinfo;
        this.whos = whos;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public int getPprice() {
        return pprice;
    }

    public void setPprice(int pprice) {
        this.pprice = pprice;
    }

    public String getPinfo() {
        return pinfo;
    }

    public void setPinfo(String pinfo) {
        this.pinfo = pinfo;
    }

    public String getPimgsrc() {
        return pimgsrc;
    }

    public void setPimgsrc(String pimgsrc) {
        this.pimgsrc = pimgsrc;
    }

    public String getPclass() {
        return pclass;
    }

    public void setPclass(String pclass) {
        this.pclass = pclass;
    }


    @Override
    public String toString() {
        return "Items{" +
                "pname='" + pname + '\'' +
                ", pprice=" + pprice +
                ", pinfo='" + pinfo + '\'' +
                ", pimgsrc='" + pimgsrc + '\'' +
                ", pclass='" + pclass + '\'' +
                ", attr='" + attr + '\'' +
                ", attrv='" + attrv + '\'' +
                ", id=" + id +
                '}';
    }

    public static void main(String[] args) {
        System.out.println(Items.allclass.size());
    }
}
